<table width="100%" border="0" cellpadding="0" cellspacing="1" class="STYLE1" bgcolor="b5d6e6">
  <tr>
    <td colspan="3" align="left" background='<%=$urr+"skin/images/bg.gif"%>'><img src='<%=$urr+"skin/icon/web_icon_015.gif"%>' width="16" height="16" />
      <span class="STYLE3"><%=@titles %></span></td>
  </tr>
</table>
<fieldset>
  <% form_for :section, :url => { :action => "create" } do |f| %>
    <p>
      <%= f.label :name,"栏目名称" %><br />
      <%= f.text_field :name %>
    </p>

    <p>
      <%= f.label :channel_id,"所属频道" %><br />
      <%= select(:section,:channel_id,Channel.find(:all).collect{|i| [ i.name,i.id]},{:include_blank =>false}) -%>
    </p>

    <p>
      <%= f.label :col_type,"栏目类型" %><br />
      <%=radio_button_tag "section[col_type]", "1",true%>图集
      <%=radio_button_tag "section[col_type]", "2",false%>图文
      <%=radio_button_tag "section[col_type]", "3",false%>小说
    </p>

    <p>
      <%= f.label :status,"状态" %><br />
      <%= f.label "开放" %> <%= radio_button :section, :status, "1", :checked => true %>
      <%= f.label "关闭" %> <%= radio_button :section, :status, "0", :checked => false %>
    </p>

    <p>
      <%= f.label :x,"X坐标" %> <%= f.text_field :x %>

      <%= f.label :y,"Y坐标" %> <%= f.text_field :y %>
    </p>

    <p>
      <%= f.label :desc,"描述" %><br />
      <%= f.text_area :desc, :cols => 35, :rows => 5 %>
    </p>

    <p>
      <%= f.label :level,"级别" %><br />
      <%= f.text_field :level %>
    </p>

    <p>
      <%= f.label :is_ad,"是否广告" %><br />
      <%=radio_button_tag "section[is_ad]", "1",false%>是
      <%=radio_button_tag "section[is_ad]", "0",true%>否
    </p>

    <p>
      <%= f.label :ad_url,"广告URL" %><br />
      <%= f.text_area :ad_url,:cols => 35, :rows => 2 %>
    </p>

    <p>
      <%= f.submit '确定' %>          &nbsp;&nbsp;&nbsp;&nbsp;<%= button_to "返回列表", :controller => "sections",:action => "index" %>
    </p>
  <% end %>
</fieldset>